package cn.edu.xmu.oomall.aftersales.model.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author Jiawei Zheng
 * @date 2021-12-11
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CreateAfterSaleVo {

    @Min(0)
    @Max(2)
    Byte type;

    @Min(1)
    Long quantity;

    @NotBlank
    String reason;

    @Min(1)
    Long regionId;

    @NotBlank
    String detail;

    @NotBlank
    String consignee;

    @NotBlank
    @Pattern(regexp = "1[3|4|5|7|8][0-9]\\d{8}")
    String mobile;
}
